#include <vector>
#include <stdio.h>
#include <cstdint>  // 包含 uint8_t 的定义

int main() {
    std::vector<int> data = { 1, 2, 3, 4 };

    // 获取 vector 数据的首地址，并转换为 uint8_t* 类型
    uint8_t* p_data = reinterpret_cast<uint8_t*>(data.data());
    for (size_t i = 0; i < data.size() * sizeof(int); ++i) {
        printf("%02x ", p_data[i]);
    }
    printf("\n");

    return 0;
}
/* 
01 00 00 00 02 00 00 00 03 00 00 00 04 00 00 00
*/